home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 61 / CDRom61.iso / Programas / Express Search / exp_setup.exe / EXWEBDOCS.EXE / Express / Program / webdocs / template / updown.js < prev    next >
Encoding:
Text File  |  1998-08-04  |  705 b   |  43 lines

  1. <SCRIPT LANGUAGE="JavaScript">
  2. <!-- 
  3. var editOptionDisabled = (!isNavigator && !isIE4);
  4.  
  5. function up() {
  6.     select = document.forms[0].sl.selectedIndex;
  7.     if (select > 0) {
  8.         prev = select - 1;
  9.         switchPosition(prev, select);        
  10.     }
  11.  
  12. }
  13.  
  14. function down() {
  15.     select = document.forms[0].sl.selectedIndex;
  16.     if ((select < document.forms[0].sl.options.length-1) && (select >= 0)) {
  17.         next = select + 1;
  18.         switchPosition(next, select);        
  19.     }
  20. }
  21.  
  22. function upOp() {
  23.     if (editOptionDisabled) {
  24.         button='upOp';
  25.         handleSubmit();
  26.     } 
  27.     else {
  28.         up();
  29.     }
  30. }
  31.  
  32. function downOp() {
  33.     if (editOptionDisabled) {
  34.         button='downOp';
  35.         handleSubmit();
  36.     } else {
  37.         down();
  38.     }
  39. }
  40.  
  41. //-->
  42. </SCRIPT>
  43.